﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.DBUtility;
using Micrhard.FMCG.Server.Validator;
using System.ComponentModel.DataAnnotations;
using Micrhard.FMCG.Server.Msg;

namespace Micrhard.FMCG.Server.Models
{
    [FluentValidation.Attributes.Validator(typeof(OrderWorkSheetModelValidator))]
    public class OrderWorkSheetModel : BasePermissionModel
    {
        public OrderWorkSheetModel()
        {
            this.ExecuteDate = DateTime.Now;
            this.RecCostDate = DateTime.Now;
        }
        [ModelPKID]
        public Guid OrderExecuteID { set; get; }
        public string Name { set; get; }
        public string ExecuteContent { set; get; }
        [DataType(DataType.Date)]
        public DateTime ExecuteDate { set; get; }
        public string ExecuteResult { set; get; }
        public Guid ExecuteType { set; get; }
        [UIHint("ExecuteTypeCtr")]
        [ModelReadTxtFromoCache(IDFieldName = "ExecuteType")]
        public string ExecuteTypeDisplay { set; get; }
        public Guid OrderID { set; get; }
        public DateTime CreateTime { set; get; }
        [DataType(DataType.Currency)]
        public decimal EstCost { set; get; }
        [DataType(DataType.Currency)]
        public decimal RealRecCost { set; get; }
        public Guid RegEmpID { set; get; }
        public bool Status { set; get; }
        [DataType(DataType.Date)]
        public DateTime RecCostDate { set; get; }
        public string ExpressNo { set; get; }
        public string CustomerName { set; get; }
        public string CustomerCellphone { set; get; }
        public string CustomerAddress { set; get; }

        public OrderModel Order { set; get; }
    }
}
